﻿using AiShow.Common;
using AiShow.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiShow.IBLL
{
    /// <summary>
    /// 视频业务管理接口
    /// </summary>
    public interface IVideoManager
    {
        /// <summary>
        /// 待上传视频
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <param name="fileName">文件名</param>
        /// <param name="headline">标题</param>
        /// <param name="location">位置</param>
        /// <returns></returns>
        OperResult<CreateUploadVideoResult> ToBeUpload(int userId, string fileName, string headline, string location = null);

        /// <summary>
        /// 同步视频
        /// </summary>
        /// <returns></returns>
        Task<OperResult<int>> SyncVideos();

        /// <summary>
        /// 初始化播放
        /// </summary>
        /// <param name="videoId">视频Id</param>
        /// <returns></returns>
        OperResult<GetPlayInfoResult> InitPlay(string videoId);

        /// <summary>
        /// 获取视频列表
        /// </summary>
        /// <returns></returns>
        OperResult<List<TBVideos>> GetVideos();

        /// <summary>
        /// 通过视频Id获取视频信息
        /// </summary>
        /// <param name="videoId"></param>
        /// <returns></returns>
        OperResult<TBVideos> GetVideoByVideoId(string videoId);

        /// <summary>
        /// 通过用户Id获取视频列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        OperResult<List<TBVideos>> GetVideosByUserId(int userId);

        /// <summary>
        /// 删除完整视频
        /// </summary>
        /// <param name="videoId">视频Id</param>
        void DeleteVideo(string videoId);
    }
}